<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>NaN非数值</title>
	</head>
	<body>
		<script>
			var a=1;
			var b;
			
			console.log(typeof(a));//number
			console.log(typeof(b));//undefined
			
			console.log(a+b);//NaN
			
			b="b";
			console.log(a+b);//1b 字符窜连接
			
			console.log("---------判断是否是NaN--------")
		    console.log(isNaN(3)); // 3不是非数字
		    console.log(isNaN('a'));
		    
		    var a1=NaN;
		    var a2=NaN;
		    console.log(a==b);//false  NaN与任何值都不相等，包括NaN本身
		    //a==b 为false，因为false是0，所以0不是非数字
		    console.log(isNaN(a==b));
		</script>
	</body>
</html>
